package com.copro.chemdb.beans;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.apache.struts.action.ActionForm;

public class Account extends ActionForm {
	private static final long serialVersionUID = 3656979365297980440L;
	
	public static final int NORMAL = 0;
	public static final int ADMIN = 1;

	private String name;
	private String password;
	private short role;

	public Account() {
	}

	public Account(ResultSet rs) throws SQLException {
		this.name = rs.getString("name");
		this.password = rs.getString("password");
		this.role = rs.getShort("role");
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public short getRole() {
		return role;
	}

	public void setRole(short role) {
		this.role = role;
	}

}
